package com.pechas.platforms;

import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL10;
import com.pechas.StartupInfo;
import com.pechas.environments.Environment2D;
import com.pechas.one.TheOne;

public class platformLibgdx implements ApplicationListener {
	public TheOne theOne;

	@Override
	public void create() {
		theOne = new TheOne(new Environment2D(StartupInfo.getStartupElement()));
		theOne.init();
	}

	@Override
	public void dispose() {
		theOne.die();
	}

	@Override
	public void render() {
		Gdx.gl.glClearColor(1, 1, 1, 1);
		Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
		theOne.step();
	}

	@Override
	public void resize(int width, int height) {
	}

	@Override
	public void pause() {
		theOne.pause();
	}

	@Override
	public void resume() {
		theOne.resume();
	}
}